package gpl.pierrick.brihaye.aramorph.lucene;

import org.apache.lucene.util.AttributeImpl;

public class GlossAttributeImpl extends AttributeImpl implements GlossAttribute {
	private String gloss;
	
	@Override
	public String getGloss() {
		return gloss;
	}

	@Override
	public void setGloss(String gloss) {
		this.gloss = gloss;
	}

	@Override
	public void clear() {
		this.gloss = null;
	}

	@Override
	public void copyTo(AttributeImpl target) {
		GlossAttributeImpl x = (GlossAttributeImpl) target;
		x.gloss = this.gloss;
	}

	@Override
	public boolean equals(Object other) {
		return this.gloss.equals(((GlossAttributeImpl)other).gloss);
	}

	@Override
	public int hashCode() {
		return gloss.hashCode();
	}

}
